<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store,no-cache">
    <meta name="Handheldfriendly" content="true">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>支付订单</title>
    <link rel="stylesheet" href="{MODULE_URL}template/mobile/style/style1/static/css/css_1.css">
    <link rel="stylesheet" href="{MODULE_URL}template/mobile/style/style1/static/css/reset.css">
    <link rel="stylesheet" href="{MODULE_URL}template/mobile/style/style1/static/css/s.css">
    <script src="{MODULE_URL}template/mobile/style/style1/static/js/jquery-1.7.1.min.js"></script>
    <script src="{MODULE_URL}template/mobile/style/style1/static/js/dp.js"></script>
    <script src="{MODULE_URL}template/mobile/style/style1/static/js/layer.js"></script>
</head>

<body>
    <header>
        <a href="{php echo $this->createMobileUrl('business',array('op' => 'coupon','operation' => 'detail','gid' => $gid))}"><i class="icon-goback"></i></a>
        <div class="title">支付订单</div>
        <i class="icon-menu"></i>
    </header>
    <div id="seat" class="page-center-box" style="bottom: 0px;">
        <form action="" method="post">
            <div id="scroll" class="pay">
                <div class="order-content">
                    <ul class="list">
                        <li>
                            <span class="left">{$item['title']}</span>
                            <span class="right">{$item['marketprice']}元</span>
                            <div class="clear"></div>
                        </li>
                        <li>
                            <span class="left">数量</span>
                            <div class="rush-num right">
                                <span class="l jq_jian">-</span>
                                <span class="m jq_num">1</span>
                                <span class="r jq_jia">+</span>
                            </div>
                            <input type="hidden" value="1" id="hidden_num" name="num">
                            <div class="clear"></div>
                        </li>
                        <li>
                            <span class="left">总价</span>
                            <span class="right"><span class="rush-price">{$item['marketprice']}</span>元</span>
                            <input type='hidden' id='price' name ='price' value="{$item['marketprice']}"/>
                            <div class="clear"></div>
                        </li>
                    </ul>
                </div>
                <script>
                function changetotal(num) {
                    var price = "{$item['marketprice']}";
                    var mobile_fan = "0";
                    var all_price = (price * num).toFixed(2) - (mobile_fan * num).toFixed(2);
                    $("#price").val(all_price);
                    $("#all_price").html(all_price + '元');
                    $(".mobile_fan").html((mobile_fan * num).toFixed(2) + '元');
                    $(".rush-price").html((price * num).toFixed(2));
                }
                $(document).ready(function() {
                    $(".jq_jia").click(function() {
                        var num = parseInt($(".jq_num").text());
                        if (num < 99) {
                            num++;
                        }
                        $(".jq_num").text(num);
                        $("#hidden_num").val(num);
                        changetotal(num);
                    });
                    $(".jq_jian").click(function() {
                        var num = parseInt($(".jq_num").text());
                        if (num > 1) {
                            num--;
                        }
                        $(".jq_num").text(num);
                        $("#hidden_num").val(num);
                        changetotal(num);
                    });
                    $(".jq_num").focusout(function() {
                        changetotal($(this).text());
                    });
                });
                </script>
                <div class="sure-pay-but">
                    <p class="left">总金额：<span id="all_price">￥{$item['marketprice']}</span></p>
                    <div class="sure-pay right" >
                        <input type="submit" class="aniu" value="确认支付" style="background:none;border:none;color:#FFFFFF;font-size:0.16rem;width:100%;margin-top:5px;">
                        <input type="hidden" name="token" value="{$_W['token']}" />
                    </div>
                </div>
            </div>
        </form>
    </div>
</body>

</html>
